﻿using IdentityModel.Client;
using ShanNiang.Hosting.Common;
using ShanNiang.Service.LoginModels.Requests;
using ShanNiang.Service.LoginModels.Responses;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShanNiang.Service.Interfaces
{
    /// <summary>
    /// 认证服务
    /// </summary>
    public interface IIdsService
    {
        /// <summary>
        /// 添加登陆提供方式
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<ApiResult?> AddProviderAsync(AddProviderRequest request);
        /// <summary>
        /// 绑定后再登陆
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<ApiResult<WxAppLoginResponse>?> BoundLoginAsync(BoundLoginRequest request);
        /// <summary>
        /// 检查登陆提供方式是否正确
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<ApiResult?> CheckProviderAsync(AddProviderRequest request);
        /// <summary>
        /// 获取token
        /// </summary>
        /// <returns></returns>
        Task<IdsToken?> GetTokenAsync();
        /// <summary>
        /// 发送认证码
        /// </summary>
        /// <param name="phoneNumber"></param>
        /// <returns></returns>
        Task<ApiResult?> SendSmsAsync(SendSmsRequest request);
        /// <summary>
        /// 微信登陆
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<ApiResult<WxAppLoginResponse>?> WxLoginAsync(WxLoginRequest request);
    }
}
